import axios from 'axios'

/**
 * get请求
 * @param url
 * @param params
 * @returns {Promise<any>}
 */
export function get(url, params = {}) {
  if (!url.startsWith('http')) {
    url = 'http://127.0.0.1:8089' + url
  }
/*  if (customHandlerException) {
    return new Promise((resolve, reject) => {
      httpCustom.get(url, {
        params: params
      }).then(response => {
        resolve(response)
      }).catch(err => {
        reject(err)
      })
    })
  }
  return new Promise((resolve, reject) => {
    http.get(url, {
      params: params
    }).then(response => {
      resolve(response.data)
    }).catch(err => {
      reject(err)
    })
  })*/
}
